<?php
namespace app\common\validate;

use think\Validate;

class LabelValidate extends Validate
{
    protected $rule =   [
        'id'              => 'require|integer',
        'name|名称'       => 'require|length:1,50',
        'type|类型'       => 'require|integer',
        'page|页数'       => 'require|integer',
        'limit|条数'      => 'require|integer',
    ];
    
    protected $scene = [
        /** admin */
        'show'      => ['id'],
        'list'      => ['page', 'limit'],
        'add'       => ['name', 'type'],
        'edit'      => ['id', 'name', 'type'],
    ];
}